package view.component.weapon.gun_lance
{
	import feathers.controls.Label;
	
	import model.vo.weapon.GunLanceVo;
	
	import view.component.weapon.BaseShortWeaponDetailView;
	
	
	/**
	 * 铳枪-详细信息界面
	 * @author £iang
	 * 
	 */	
	public class GunLanceDetailView extends BaseShortWeaponDetailView
	{
		//-----------------------------
		// variables
		//-----------------------------
		
		/** 炮击标题 */
		public var gunTitle:Label;
		/** 炮击信息 */
		public var gunLabel:Label;
		
		//-----------------------------
		// properties
		//-----------------------------
		
		//-----------------------------
		// setter&getter
		//-----------------------------
		
		//-----------------------------
		// methods
		//-----------------------------
		
		/**
		 * 初始化函数 
		 * 
		 */		
		override protected function initialize():void
		{
			super.initialize();
			gunTitle = new Label();
			gunTitle.text = "   炮击：";
			mainSC.addChild( gunTitle );
			
			gunLabel = new Label();
			mainSC.addChild( gunLabel );
		}
		
		/**
		 * 绘制函数 
		 * 
		 */		
		override protected function draw():void
		{
			super.draw();
			gunTitle.x = 20 * this.dpiScale;
			gunTitle.y = 300 * this.dpiScale;
			gunLabel.x = 150 * this.dpiScale;
			gunLabel.y = 300 * this.dpiScale;
			drawPart();
		}
		
		/**
		 * 设置铳枪数据 
		 * @param fluteVo 铳枪数据
		 * 
		 */		
		public function setGunLanceData( gunLanceVo:GunLanceVo ):void
		{
			setShortData( gunLanceVo );
			gunLabel.text = gunLanceVo.gunType + " " + gunLanceVo.gunLevel;
		}
		
		//-----------------------------
		// events
		//-----------------------------
		
		//-----------------------------
		// dispose
		//-----------------------------
		
		/**
		 * 析构函数 
		 * 
		 */		
		override public function dispose():void
		{
			gunTitle.dispose(); gunTitle = null;
			gunLabel.dispose(); gunLabel = null;
			super.dispose();
		}
		
		//-----------------------------
		// construction
		//-----------------------------
		
		/**
		 * 构造函数
		 *
		 */
		public function GunLanceDetailView()
		{
			super();
			weaponType = "gun_lance";
			insertOffset = 60;
		}
	}
}